Page move undo feature
[lhc/web/wiklou.git] / languages / Language.php
index 400611d..0b10bd2 100644 (file)
@@ -53,7 +53,6 @@ if(isset($wgExtraNamespaces)) {
 /* private */ $wgDefaultUserOptionsEn = array(
        'quickbar'              => 1,
        'underline'             => 1,
-       'hover'                 => 1,
        'cols'                  => 80,
        'rows'                  => 25,
        'searchlimit'           => 20,
@@ -81,6 +80,7 @@ if(isset($wgExtraNamespaces)) {
        'rcusemodstyle'         => 1,
        'showupdated'           => 1,
        'fancysig' => 0,
+       'externaleditor' => 0,
 );
 
 /* private */ $wgQuickbarSettingsEn = array(
@@ -122,15 +122,14 @@ define( 'MW_DATE_DEFAULT', false );
 define( 'MW_DATE_USER_FORMAT', true );
 
 /* private */ $wgDateFormatsEn = array(
-       'No preference',
-       'January 15, 2001',
-       '15 January 2001',
-       '2001 January 15',
-       '2001-01-15'
+       'Default',
+       '16:12, January 15, 2001',
+       '16:12, 15 January 2001',
+       '16:12, 2001 January 15',
+       'ISO 8601' => '2001-01-15 16:12:34'
 );
 
 /* private */ $wgUserTogglesEn = array(
-       'hover',
        'underline',
        'highlightbroken',
        'justify',
@@ -156,7 +155,8 @@ define( 'MW_DATE_USER_FORMAT', true );
        'shownumberswatching',
        'rcusemodstyle',
        'showupdated',
-       'fancysig'
+       'fancysig',
+       'externaleditor'
 );
 
 /* private */ $wgBookstoreListEn = array(
@@ -241,6 +241,7 @@ $wgLanguageNamesEn =& $wgLanguageNames;
        MAG_NOCONTENTCONVERT     => array( 0,    '__NOCONTENTCONVERT__', '__NOCC__'),
        MAG_CURRENTWEEK          => array( 1,    'CURRENTWEEK'            ),
        MAG_CURRENTDOW           => array( 1,    'CURRENTDOW'             ),
+       MAG_REVISIONID           => array( 1,    'REVISIONID'             ),    
 );
 
 #-------------------------------------------------------------------
@@ -257,7 +258,6 @@ global $wgRightsText;
 'special_version_prefix' => ' ',
 'special_version_postfix' => ' ',
 # User preference toggles
-'tog-hover'            => 'Show hoverbox over wiki links',
 'tog-underline' => 'Underline links',
 'tog-highlightbroken' => 'Format broken links <a href="" class="new">like this</a> (alternative: like this<a href="" class="internal">?</a>).',
 'tog-justify'  => 'Justify paragraphs',
@@ -284,6 +284,7 @@ global $wgRightsText;
 'tog-rcusemodstyle'            => 'Show recent changes in UseMod style: only the most recent change of any page is listed.',
 'tog-showupdated'              => 'Show update marker ',
 'tog-fancysig' => 'Raw signatures (without automatic link)',
+'tog-externaleditor' => 'Use external editor by default',
 
 # dates
 'sunday' => 'Sunday',
@@ -337,21 +338,21 @@ and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] f
 'portal'               => 'Community portal',
 'portal-url'           => 'Project:Community Portal',
 'about'                        => 'About',
-"aboutsite"      => "About {{SITENAME}}",
-"aboutpage"            => "Project:About",
+'aboutsite'      => 'About {{SITENAME}}',
+'aboutpage'            => 'Project:About',
 'article' => 'Content page',
 'help'                 => 'Help',
-"helppage"             => "Help:Contents",
-"wikititlesuffix" => "{{SITENAME}}",
-"bugreports"   => "Bug reports",
-"bugreportspage" => "Project:Bug_reports",
+'helppage'             => 'Help:Contents',
+'wikititlesuffix' => '{{SITENAME}}',
+'bugreports'   => 'Bug reports',
+'bugreportspage' => 'Project:Bug_reports',
 'sitesupport'   => '-', # To enable, something like 'Donations', 
 'sitesupport-url' => 'Project:Site support',
 'faq'                  => 'FAQ',
-"faqpage"              => "Project:FAQ",
-"edithelp"             => "Editing help",
-"newwindow"            => "(opens in new window)",
-"edithelppage" => "Help:Editing",
+'faqpage'              => 'Project:FAQ',
+'edithelp'             => 'Editing help',
+'newwindow'            => '(opens in new window)',
+'edithelppage' => 'Help:Editing',
 'cancel'               => 'Cancel',
 'qbfind'               => 'Find',
 'qbbrowse'             => 'Browse',
@@ -395,9 +396,9 @@ and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] f
 'edit' => 'Edit',
 'editthispage' => 'Edit this page',
 'delete' => 'Delete',
-"deletethispage" => "Delete this page",
-"undelete_short1" => "Undelete one edit",
-"undelete_short" => "Undelete $1 edits",
+'deletethispage' => 'Delete this page',
+'undelete_short1' => 'Undelete one edit',
+'undelete_short' => 'Undelete $1 edits',
 'protect' => 'Protect',
 'protectthispage' => 'Protect this page',
 'unprotect' => 'Unprotect',
@@ -764,6 +765,7 @@ Please check the URL you used to access this page.\n",
 Legend: (cur) = difference with current version,
 (last) = difference with preceding version, M = minor edit.',
 'history_copyright'    => '-',
+'deletedrev' => '[deleted]',
 
 # Diffs
 #
@@ -810,25 +812,30 @@ $1<br />
 $2 List redirects &nbsp; Search for $3 $9",
 "searchdisabled" => '<p style="margin: 1.5em 2em 1em">{{SITENAME}} search is disabled for performance reasons. You can search via Google in the meantime.
 <span style="font-size: 89%; display: block; margin-left: .2em">Note that their indexes of {{SITENAME}} content may be out of date.</span></p>',
-'googlesearch' => "
-<!-- SiteSearch Google -->
-<FORM method=GET action=\"http://www.google.com/search\">
-<TABLE bgcolor=\"#FFFFFF\"><tr><td>
-<A HREF=\"http://www.google.com/\">
-<IMG SRC=\"http://www.google.com/logos/Logo_40wht.gif\"
-border=\"0\" ALT=\"Google\"></A>
-</td>
-<td>
-<INPUT TYPE=text name=q size=31 maxlength=255 value=\"$1\">
-<INPUT type=submit name=btnG VALUE=\"Google Search\">
-<font size=-1>
-<input type=hidden name=domains value=\"{{SERVER}}\"><br /><input type=radio name=sitesearch value=\"\"> WWW <input type=radio name=sitesearch value=\"{{SERVER}}\" checked> {{SERVER}} <br />
-<input type='hidden' name='ie' value='$2'>
-<input type='hidden' name='oe' value='$2'>
-</font>
-</td></tr></TABLE>
-</FORM>
-<!-- SiteSearch Google -->",
+
+'googlesearch' => '
+<div style="margin-left: 2em">
+
+<!-- Google search -->
+<div style="width:130px;float:left;text-align:center;position:relative;top:-8px"><a href="http://www.google.com/" style="padding:0;background-image:none"><img src="http://www.google.com/logos/Logo_40wht.gif" alt="Google" style="border:none" /></a></div>
+
+<form method="get" action="http://www.google.com/search" style="margin-left:135px">
+  <div>
+    <input type="hidden" name="domains" value="{{SERVER}}" />
+    <input type="hidden" name="num" value="50" />
+    <input type="hidden" name="ie" value="$2" />
+    <input type="hidden" name="oe" value="$2" />
+    
+    <input type="text" name="q" size="31" maxlength="255" value="$1" />
+    <input type="submit" name="btnG" value="Google Search" />
+  </div>
+  <div style="font-size:90%">
+    <input type="radio" name="sitesearch" id="gwiki" value="{{SERVER}}" checked="checked" /><label for="gwiki">{{SITENAME}}</label>
+    <input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label>
+  </div>
+</form>
+
+</div>',
 'blanknamespace' => '(Main)',
 
 # Preferences page
@@ -868,7 +875,7 @@ See [[Project:User preferences help]] for help deciphering the options.",
 'textboxsize'  => 'Editing',
 'rows'                 => 'Rows',
 'columns'              => 'Columns',
-'searchresultshead' => 'Search result settings',
+'searchresultshead' => 'Search results',
 'resultsperpage' => 'Hits to show per page',
 'contextlines' => 'Lines to show per hit',
 'contextchars' => 'Characters of context per line',
@@ -1004,7 +1011,7 @@ agrees to license it under the terms of the $1.",
 'illegalfilename'      => 'The filename "$1" contains characters that are not allowed in page titles. Please rename the file and try uploading it again.',
 'badfilename'  => "Image name has been changed to \"$1\".",
 'badfiletype'  => "\".$1\" is not a recommended image file format.",
-'largefile'            => 'It is recommended that images not exceed 100k in size.',
+'largefile'            => 'It is recommended that images not exceed $1 bytes in size, this file is $2 bytes',
 'emptyfile'            => 'The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.',
 'fileexists'           => 'A file with this name exists already, please check $1 if you are not sure if you want to change it.',
 'successfulupload' => 'Successful upload',
@@ -1014,7 +1021,7 @@ in information about the file, such as where it came from, when it was
 created and by whom, and anything else you may know about it. If this is an image, you can insert it like this: <tt><nowiki>[[Image:$1|thumb|Description]]</nowiki></tt>",
 'uploadwarning' => 'Upload warning',
 'savefile'             => 'Save file',
-'uploadedimage' => "uploaded \"$1\"",
+'uploadedimage' => "uploaded \"[[$1]]\"",
 'uploaddisabled' => 'Sorry, uploading is disabled.',
 'uploadcorrupt' => 'The file is corrupt or has an incorrect extension. Please check the file and upload again.',
 
@@ -1026,7 +1033,6 @@ created and by whom, and anything else you may know about it. If this is an imag
 'ilshowmatch'  => 'Show all images with names matching',
 'ilsubmit'             => 'Search',
 'showlast'             => "Show last $1 images sorted $2.",
-'all'                  => 'all',
 'byname'               => 'by name',
 'bydate'               => 'by date',
 'bysize'               => 'by size',
@@ -1157,15 +1163,30 @@ You can narrow down the view by selecting a log type, the user name, or the affe
 # Special:Allpages
 'nextpage'          => 'Next page ($1)',
 'articlenamespace'  => '(articles)',
-'allpagesformtext1' => 'Display pages starting at: $1',
-'allpagesformtext2' => 'Choose namespace: $1 $2',
-'allarticles'       => 'All articles',
-'allpagesprev'      => 'Previous',
-'allpagesnext'      => 'Next',
-'allpagesnamespace' => 'All pages ($1 namespace)',
-'allpagessubmit'    => 'Go',
-
-# Email this user
+'allpagesformtext' => '
+<table border="0">
+       <tr>
+               <td align="right">Display pages starting at:</td>
+               <td align="left">$1</td>
+       </tr>
+       <tr>
+               <td align="right">Namespace:</td>
+               <td align="left">$2 $3</td>
+       </tr>
+       <tr>
+               <td align="right">$4</td>
+               <td align="left">Invert</td>
+       </tr>
+</table>',
+'allarticles'          => 'All articles',
+'allnonarticles'       => 'All non-articles',
+'allinnamespace'       => 'All pages ($1 namespace)',
+'allnotinnamespace'    => 'All pages (not in $1 namespace)',
+'allpagesprev'         => 'Previous',
+'allpagesnext'         => 'Next',
+'allpagessubmit'       => 'Go',
+
+# E this user
 #
 'mailnologin'  => 'No send address',
 'mailnologintext' => "You must be <a href=\"{{localurl:Special:Userlogin\">logged in</a>
@@ -1243,7 +1264,7 @@ You will be notified by email when someone changes a page which is listed in you
 'email_notification_reset'                     => 'Reset all notification flags (set their status to "visited")',
 'email_notification_newpagetext'=> 'This is a new page.',
 'email_notification_to'        => '$WATCHINGUSERNAME_QP <$WATCHINGUSEREMAILADDR>',
-'email_notification_subject'   => '{{SITENAME}} page $PAGETITLE_QP has been changed by $PAGEEDITOR_QP',
+'email_notification_subject'   => '{{SITENAME}} page $PAGETITLE has been changed by $PAGEEDITOR',
 'email_notification_lastvisitedrevisiontext' => 'See {{SERVER}}{{localurl:$PAGETITLE_RAWURL|diff=0&oldid=$OLDID}} for all changes since your last visit.',
 'email_notification_body' => 'Dear $WATCHINGUSERNAME,
 
@@ -1312,8 +1333,8 @@ Please hit "back" and reload the page you came from, then try again.',
 'protectlogpage' => 'Protection_log',
 'protectlogtext' => "Below is a list of page locks/unlocks.
 See [[Project:Protected page]] for more information.",
-'protectedarticle' => "protected $1",
-'unprotectedarticle' => "unprotected $1",
+'protectedarticle' => "protected \"[[$1]]\"",
+'unprotectedarticle' => "unprotected \"[[$1]]\"",
 'protectsub' =>"(Protecting \"$1\")",
 'confirmprotecttext' => 'Do you really want to protect this page?',
 'confirmprotect' => 'Confirm protection',
@@ -1348,6 +1369,13 @@ See [[Special:Log/delete]] for a record of recent deletions and restorations.",
 'contributions' => 'User contributions',
 'mycontris'     => 'My contributions',
 'contribsub'    => "For $1",
+'contributionsformtext' => '
+<table border="0">
+        <tr>
+                <td align="right">Namespace:</td>
+                <td align="left">$1 $2</td>
+        </tr>
+</table>',
 'nocontribs'    => 'No changes were found matching these criteria.',
 'ucnote'        => "Below are this user's last <b>$1</b> changes in the last <b>$2</b> days.",
 'uclinks'       => "View the last $1 changes; view the last $2 days.",
@@ -1374,7 +1402,8 @@ This should be done only only to prevent vandalism, and in
 accordance with [[Project:Policy|policy]].
 Fill in a specific reason below (for example, citing particular
 pages that were vandalized).",
-'ipaddress'            => 'IP Address/username',
+'ipaddress'            => 'IP Address',
+'ipadressorusername' => 'IP Address or username',
 'ipbexpiry'            => 'Expiry',
 'ipbreason'            => 'Reason',
 'ipbsubmit'            => 'Block this user',
@@ -1387,7 +1416,7 @@ pages that were vandalized).",
 'unblockiptext'        => 'Use the form below to restore write access
 to a previously blocked IP address or username.',
 'ipusubmit'            => 'Unblock this address',
-'ipusuccess'   => "\"$1\" unblocked",
+'ipusuccess'   => "\"[[$1]]\" unblocked",
 'ipblocklist'  => 'List of blocked IP addresses and usernames',
 'blocklistline'        => "$1, $2 blocked $3 (expires $4)",
 'blocklink'            => 'block',
@@ -1395,7 +1424,7 @@ to a previously blocked IP address or username.',
 'contribslink' => 'contribs',
 'autoblocker'  => "Autoblocked because you share an IP address with \"$1\". Reason \"$2\".",
 'blocklogpage' => 'Block_log',
-'blocklogentry'        => 'blocked "$1" with an expiry time of $2',
+'blocklogentry'        => 'blocked "[[$1]]" with an expiry time of $2',
 'blocklogtext' => 'This is a log of user blocking and unblocking actions. Automatically
 blocked IP addresses are not listed. See the [[Special:Ipblocklist|IP block list]] for
 the list of currently operational bans and blocks.',
@@ -1406,6 +1435,9 @@ the list of currently operational bans and blocks.',
 'proxyblocker' => 'Proxy blocker',
 'proxyblockreason'     => 'Your IP address has been blocked because it is an open proxy. Please contact your Internet service provider or tech support and inform them of this serious security problem.',
 'proxyblocksuccess'    => "Done.\n",
+'sorbs'         => 'SORBS DNSBL',
+'sorbsreason'   => 'Your IP address is listed as an open proxy in the [http://www.sorbs.net SORBS] DNSBL.',
+
 
 # Developer tools
 #
@@ -1550,10 +1582,12 @@ title. Please merge them manually.',
 'movetalk'             => 'Move "talk" page as well, if applicable.',
 'talkpagemoved' => 'The corresponding talk page was also moved.',
 'talkpagenotmoved' => 'The corresponding talk page was <strong>not</strong> moved.',
-'1movedto2'            => "$1 moved to $2",
-'1movedto2_redir' => '$1 moved to $2 over redirect',
+'1movedto2'            => "[[$1]] moved to [[$2]]",
+'1movedto2_redir' => '[[$1]] moved to [[$2]] over redirect',
 'movelogpage' => 'Move log',
 'movelogpagetext' => 'Below is a list of page moved.',
+'movereason'   => 'Reason',
+'revertmove'   => 'revert',
 
 # Export
 
@@ -1647,12 +1681,12 @@ article [[Train]].
 'listingcontinuesabbrev' => " cont.",
 
 # Info page
-"infosubtitle" => "Information for page",
-"numedits" => "Number of edits (article): $1",
-"numtalkedits" => "Number of edits (discussion page): $1",
-"numwatchers" => "Number of watchers: $1",
-"numauthors" => "Number of distinct authors (article): $1",
-"numtalkauthors" => "Number of distinct authors (discussion page): $1",
+'infosubtitle' => 'Information for page',
+'numedits' => 'Number of edits (article): $1',
+'numtalkedits' => 'Number of edits (discussion page): $1',
+'numwatchers' => 'Number of watchers: $1',
+'numauthors' => 'Number of distinct authors (article): $1',
+'numtalkauthors' => 'Number of distinct authors (discussion page): $1',
 
 # Math options
 'mw_math_png' => 'Always render PNG',
@@ -1790,6 +1824,16 @@ ta[\'ca-nstab-category\'] = new Array(\'c\',\'View the category page\');
 
 'passwordtooshort' => 'Your password is too short. It must have at least $1 characters.',
 
+# external editor support
+'edit-externally' => 'Edit this file using an external application',
+'edit-externally-help' => 'See the [http://meta.wikimedia.org/wiki/Help:External_editors setup instructions] for more information.',
+
+# 'all' in various places, this might be different for inflicted languages
+'recentchangesall' => 'all',
+'imagelistall' => 'all',
+'watchlistall1' => 'all',
+'watchlistall2' => 'all',
+'contributionsall' => 'all',
 );
 
 #--------------------------------------------------------------------------
@@ -1886,7 +1930,7 @@ class Language {
        }
 
        function getUserToggle( $tog ) {
-               return wfMsg("tog-".$tog);
+               return wfMsg('tog-'.$tog);
        }
 
        function getLanguageNames() {
@@ -1938,7 +1982,7 @@ class Language {
                global $wgUser, $wgLocalTZoffset;
 
                if (!$tz) {
-               $tz = $wgUser->getOption( 'timecorrection' );
+                       $tz = $wgUser->getOption( 'timecorrection' );
                }
 
                if ( $tz === '' ) {
@@ -1964,35 +2008,33 @@ class Language {
        }
 
        function date( $ts, $adj = false, $format = MW_DATE_USER_FORMAT, $timecorrection = false ) {
-               global $wgAmericanDates, $wgUser, $wgUseDynamicDates;
-
+               global $wgAmericanDates, $wgUser;
+               
                $ts=wfTimestamp(TS_MW,$ts);
 
                if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
 
-               if ( $wgUseDynamicDates ) {
-                       if ( $format == MW_DATE_USER_FORMAT ) {
-                               $datePreference = $wgUser->getOption( 'date' );
-                       } else {
-                               $options = $this->getDefaultUserOptions();
-                               $datePreference = $options['date'];
-                       }
-                       if ( $datePreference == 0 ) {
-                               $datePreference = $wgAmericanDates ? 1 : 2;
-                       }
+               
+               if ( $format == MW_DATE_USER_FORMAT ) {
+                       $datePreference = $wgUser->getOption( 'date' );
                } else {
+                       $options = $this->getDefaultUserOptions();
+                       $datePreference = $options['date'];
+               }
+
+               if ($datePreference == '0') {
                        $datePreference = $wgAmericanDates ? 1 : 2;
                }
 
                $month = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) );
                $day = $this->formatNum( 0 + substr( $ts, 6, 2 ) );
                $year = $this->formatNum( substr( $ts, 0, 4 ) );
-
+               
                switch( $datePreference ) {
-                       case 1: return "$month $day, $year";
-                       case 2: return "$day $month $year";
-                       case 4: return substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
-                       default: return "$year $month $day";
+                       case '2': return "$day $month $year";
+                       case '3': return "$year $month $day";
+                       case 'ISO 8601': return substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
+                       default: return "$month $day, $year";
                }
        }
 
@@ -2003,20 +2045,20 @@ class Language {
                if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
 
                $t = substr( $ts, 8, 2 ) . ':' . substr( $ts, 10, 2 );
-               if ( $seconds || $wgUser->getOption( 'date' ) == 4) {
+               if ( $seconds || $wgUser->getOption( 'date' ) == 'ISO 8601' ) {
                        $t .= ':' . substr( $ts, 12, 2 );
                }
                return $this->formatNum( $t );
        }
-
+       
        function timeanddate( $ts, $adj = false, $format = MW_DATE_USER_FORMAT, $timecorrection = false, $dateandtime = false) {
                global $wgUser;
                $ts=wfTimestamp(TS_MW,$ts);
-               if ( 4 == $wgUser->getOption( 'date' ) ) {
-                       return $this->date( $ts, $adj, $format, $timecorrection ) . ' ' .
+
+               switch ( $wgUser->getOption( 'date' ) ) {
+                       case 'ISO 8601': return $this->date( $ts, $adj, $format, $timecorrection ) . ' ' .
                                $this->time( $ts, $adj, false, $timecorrection );
-               } else {
-                       return $this->time( $ts, $adj, false, $timecorrection ) . ', ' .
+                       default: return $this->time( $ts, $adj, false, $timecorrection ) . ', ' .
                                $this->date( $ts, $adj, $format, $timecorrection );
                }
        }